package com.lm.fastjson.example;

import com.alibaba.fastjson.JSON;
import com.lm.fastjson.entry.Address;
import com.lm.fastjson.entry.Person;

public class FastjsonSerializationExample {
    public static void main(String[] args) {
        // 创建对象
        Person person = new Person("Alice", 28, new Address("Shanghai", "200000"));

        // 使用 Fastjson 进行序列化
        String jsonString = JSON.toJSONString(person);
        System.out.println("Serialized JSON: " + jsonString);
    }
}
